//
//  TTUserAccountViewModel.swift
//  NewWeiBo
//
//  Created by 吴天益 on 2017/7/26.
//  Copyright © 2017年 ttt. All rights reserved.
//

import UIKit

class TTUserAccountViewModel: NSObject {
    
    static var shareViewModel = TTUserAccountViewModel()
    
    override init() {
        super.init()
        
        userAccountModel = TTUserAccountModel.loadUserAccount()
    }
    
    var userAccountModel: TTUserAccountModel?
    
    
    //判断是否登录
    var isLogin: Bool{
        return userAccountModel?.access_token != nil
    }
    
    var access_token: String{
        
        let result = Date().compare((userAccountModel?.expiresDate)!)
        
        print("dddddddd\(result)")
        
        return self.access_token
    }
    
    

}
